package java_1_8.interface_test.capacity;

public class Dog extends Animal implements IRun{
    public Dog(String name) {
        super(name);//没有无参构造所以用sueper显示的调用有参构造
    }

    @Override
    public void eat(String food) {
        System.out.println("狗狗"+this.name+"正在吃"+food);
    }

    @Override
    public void run() {//狗狗具备跑的行为
        System.out.println("狗狗"+this.name+"正在撒欢的跑");
    }
}
